package jpa.entitys.promis.common;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the PMS_PAYMENT_RECEIVED_DETAILS database table.
 * 
 */
@Embeddable
public class PmsPaymentReceivedDetailPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String company;

	@Column(name="VOUCHER_TYPE")
	private String voucherType;

	@Column(name="VOUCHER_SERIES")
	private String voucherSeries;

	@Column(name="VOUCHER_NO")
	private long voucherNo;

	@Column(name="SEQ_NO")
	private long seqNo;

	public PmsPaymentReceivedDetailPK() {
	}
	public String getCompany() {
		return this.company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getVoucherType() {
		return this.voucherType;
	}
	public void setVoucherType(String voucherType) {
		this.voucherType = voucherType;
	}
	public String getVoucherSeries() {
		return this.voucherSeries;
	}
	public void setVoucherSeries(String voucherSeries) {
		this.voucherSeries = voucherSeries;
	}
	public long getVoucherNo() {
		return this.voucherNo;
	}
	public void setVoucherNo(long voucherNo) {
		this.voucherNo = voucherNo;
	}
	public long getSeqNo() {
		return this.seqNo;
	}
	public void setSeqNo(long seqNo) {
		this.seqNo = seqNo;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PmsPaymentReceivedDetailPK)) {
			return false;
		}
		PmsPaymentReceivedDetailPK castOther = (PmsPaymentReceivedDetailPK)other;
		return 
			this.company.equals(castOther.company)
			&& this.voucherType.equals(castOther.voucherType)
			&& this.voucherSeries.equals(castOther.voucherSeries)
			&& (this.voucherNo == castOther.voucherNo)
			&& (this.seqNo == castOther.seqNo);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.company.hashCode();
		hash = hash * prime + this.voucherType.hashCode();
		hash = hash * prime + this.voucherSeries.hashCode();
		hash = hash * prime + ((int) (this.voucherNo ^ (this.voucherNo >>> 32)));
		hash = hash * prime + ((int) (this.seqNo ^ (this.seqNo >>> 32)));
		
		return hash;
	}
}